Skip to content

Conversation

mr-vara
Copy link
Contributor

@mr-vara mr-vara commented Jun 23, 2025

Proposed changes

This PR sets up the repository to use a centralized, reusable GitHub Actions workflow that automates localization file translation using Azure AI Translation (Microsoft Translator).

What’s Included

  • Calls the reusable translation workflow from the central repository.
  • Supports translation of .po and .json files with optional context stripping.
  • Allows configuration of text_domain, defaulting to the repository name if not provided.

Configuration Notes

  • Triggers on push to main and via manual workflow_dispatch.
  • Requires the following secrets:
    • TRANSLATOR_API_KEY (Azure AI Translation)
    • NEWFOLD_ACCESS_TOKEN (for creating pull requests)

This setup helps automate translation updates across repositories using a single, centralized translation logic.

Documentation

AI Translation Workflow Documentation

wpscholar
wpscholar previously approved these changes Jun 23, 2025
@mr-vara mr-vara requested a review from circlecube June 24, 2025 07:09
Copy link
Member

@desrosj desrosj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change!

uses: newfold-labs/workflows/.github/workflows/reusable-translations.yml@main
with:
text_domain: 'wp-module-onboarding'
pr_branch_name: 'trunk'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pr_branch_name: 'trunk'

This is no longer required or accepted. The github.ref_name will be used by default.

@circlecube
Copy link
Member

@mr-vara can we get this PR wrapped up so it can be merged, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants